STAT 184: Introduction to R

Presenter: Olivia Beck
Content Credit: Matthew Beckman

August 24, 2022

Today’s Objectives

A Little About Me….

drawing

Examples of contemporary data

Taxicabs and the Shared Economy

Gapminder

The logic of this course: Less volume, more creativity.

Individual lego bricks are simple.1 A complex model made of lego bricks 2
Bricks Trafalgar Legoland

The logic of this course: Less volume, more creativity.

R Workflow

Some Foundations:

Examples from many fields

Some data sets we will use for examples.

BabyNames                Names of children as recorded by the US Social
                            Security Administration.
CountryData              Many variables on countries from the 2014 CIA factbook.
MedicareCharges          
MedicareProviders        
Minneapolis2017          Ballots in the 2017 Mayoral election in Minneapolis
NCI60                    Gene expression in cancer.
WorldCities              Cities and their populations
ZipDemography            Demographic information for most US ZIP Codes (Postal Codes)
ZipGeography             Geographic information by US Zip Codes (Postal Codes)
registeredVoters         A sample of the voter registration list for Wake County, 
                            North Carolina in Fall 2010.

Exploratory data analysis (EDA)

Due to the nature of the course and our goals, we will often characterize our work from the paradigm of Exploratory data analysis (EDA). Our goals for high-quality EDA include:

  1. Examine the data source: variable types, coding, missingness, summary statistics/plots, who/what/when/where/why/how data were collected
  2. Discover features that influence may modeling decisions: investigate potential outliers, consideration for recoding variables (e.g., numeric data that’s functionally dichotomous), evaluate correlation structure (e.g., autocorrelation, hierarchy, spatial/temporal proximity)
  3. Address research questions: build intuition and note preliminary observations/conclusions related to each research question. Also, note observations that prompt you to refine your research questions or add new questions to investigate

Orientation to Class Resources

Assignments and Questions


  1. Source : “Lego Color Bricks” by Alan Chia - Lego Color Bricks. Licensed under CC BY-SA 2.0 via Wikimedia Commons↩︎

  2. Source: Trafalgar Legoland 2003 by Kaihsu Tai - Kaihsu Tai. Licensed under CC BY-SA 3.0 via Wikimedia Commons↩︎